/**
 * Copyright (C) 2022-2023 Timber Chain Cloud (TimberCLD). All Rights Reserved.
 *
 * @author Jianglong
 * @email jianglong@timbercld.com
 * @site https://www.timbercld.com/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
.tccui-page__login {
  &::before,
  &::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    content: "";
  }
  &::before {
    background-image: url(@/assets/img/login_bg.png);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: left top;
  }
  .tccui-content {
    display: flex;
    height: 100vh;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    min-width: 400px;
    padding: 50px 20px 150px;
    text-align: center;
    &__wrapper {
      height: 100vh;
      background-color: transparent;
      overflow-x: hidden;
      overflow-y: auto;
    }
  }
  .login-header {
    color: #303544;
    width: 100%;
    .logo-svg {
      display: inline-block;
      height: 110px;
      width: 130px;
      overflow: hidden;
      img {
        width: 130px;
        transform: translateX(130px);
        filter: drop-shadow(-130px 0px 0px var(--el-color-primary));
      }
    }
    .login-brand {
      margin: 45px 0 28px;
      font-size: 34px;
      font-weight: 400;
      letter-spacing: 2px;
      text-transform: uppercase;
    }
    .login-intro {
      padding: 0;
      margin: 0;
      list-style: none;
      > li {
        font-size: 16px;
        line-height: 1.5;
        color: rgba(255, 255, 255, .6);
        & + li {
          margin-top: 5px;
        }
      }
    }
  }
  .login-body {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-width: 400px;
    width: 500px;
    box-sizing: border-box;
    .login-title {
      font-size: 18px;
      font-weight: 400;
    }
    .el-form {
      width: 100%;
      padding: 0 40px;
    }
    .el-input {
      height: $--input-height;
      .el-input__inner {
        height: $--input-height;
      }
    }
    .el-input__prefix .el-input__icon {
      font-size: 18px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .login-captcha {
      height: $--input-height;
      line-height: $--input-height -2px;
      > img {
        height: $--input-height;
        cursor: pointer;
      }
    }
    .login-shortcut {
      margin-bottom: 20px;
      &__title {
        position: relative;
        margin: 0 0 15px;
        font-weight: 400;

        &::before {
          position: absolute;
          top: 50%;
          right: 0;
          left: 0;
          z-index: 1;
          content: "";
          height: 1px;
          margin-top: -.5px;
          background-color: $--border-color-base;
          overflow: hidden;
        }
        > span {
          position: relative;
          z-index: 2;
          padding: 0 20px;
          color: rgba(0, 0, 0, .3);
          background-color: #fff;
        }
      }
      &__list {
        padding: 0;
        margin: 0;
        list-style: none;
        font-size: 0;
        > li {
          display: inline-block;
          vertical-align: middle;
          margin: 0 10px;
          font-size: 28px;
        }
      }
    }
    .login-guide {
      color: rgba(0, 0, 0, .3);
    }
  }
  .login-footer {
    position: absolute;
    bottom: 0;
    padding: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #303544;
  }
  // 右侧垂直风格
  &--right-vertical {
    .tccui-content {
      flex-flow: row nowrap;
      justify-content: flex-start;
      align-items: stretch;
      padding: 0;
    }
    .login-header {
      flex: 1;
      display: flex;
      flex-flow: column wrap;
      justify-content: center;
      padding: 30px 120px;
      text-align: left;
    }
    .login-body {
      position: relative;
      display: flex;
      flex-flow: column wrap;
      justify-content: center;
      text-align: center;
      .login-guide {
        margin-top: 0;
      }
    }
    .login-footer {
      right: 0;
      color: $--color-text-regular;
      a {
        color: $--color-text-regular;
        &:focus,
        &:hover {
          color: $--color-primary;
        }
      }
    }
  }
}
@media (max-width: 991px) {
  .tccui-page__login {
    &--right-vertical {
      .login-header {
        padding: 30px;
      }
    }
  }
}
@media (max-width: 767px) {
  .tccui-page__login {
    &--right-vertical {
      .login-header {
        .login-brand,
        .login-intro {
          display: none;
        }
      }
    }
  }
}
@media (max-width: 575px) {
  .tccui-page__login {
    .login-body,
    .login-footer {
      width: 100%;
    }
    .login-captcha {
      text-align: left;
      > img {
        width: 136px;
      }
    }
    &--right-vertical {
      .login-header {
        display: none;
      }
    }
  }
}
